use [eDASexpress]
GO

/****** Object:  Login NT AUTHORITY\NETWORK SERVICE    Script Date: 2009-9-9 9:31:25 ******/
if not exists (select * from master.dbo.syslogins where loginname = N'NT AUTHORITY\NETWORK SERVICE')
	exec sp_grantlogin N'NT AUTHORITY\NETWORK SERVICE'
	exec sp_defaultdb N'NT AUTHORITY\NETWORK SERVICE', N'eDASexpress'
GO

/****** Object:  User Network Service    Script Date: 2009-9-9 9:31:25 ******/
if not exists (select * from dbo.sysusers where name = N'Network Service' and uid < 16382)
	EXEC sp_grantdbaccess N'NT AUTHORITY\NETWORK SERVICE', N'Network Service'
GO

/****** Object:  User Network Service    Script Date: 2009-9-9 9:31:25 ******/
exec sp_addrolemember N'db_owner', N'Network Service'
GO

GRANT  SELECT ,  UPDATE ,  INSERT ,  DELETE  ON [dbo].[KDepartment]  TO [Network Service]
GO

GRANT  SELECT ,  UPDATE ,  INSERT ,  DELETE  ON [dbo].[KLog]  TO [Network Service]
GO

GRANT  SELECT ,  UPDATE ,  INSERT ,  DELETE  ON [dbo].[KOption]  TO [Network Service]
GO

GRANT  SELECT ,  UPDATE ,  INSERT ,  DELETE  ON [dbo].[KRadius]  TO [Network Service]
GO

GRANT  SELECT ,  UPDATE ,  INSERT ,  DELETE  ON [dbo].[KSetup]  TO [Network Service]
GO

GRANT  SELECT ,  UPDATE ,  INSERT ,  DELETE  ON [dbo].[KTokens]  TO [Network Service]
GO

GRANT  SELECT ,  UPDATE ,  INSERT ,  DELETE  ON [dbo].[KOperators]  TO [Network Service]
GO
